﻿using System;

namespace DelegationAndEvents
{

    public class Class1
    {
        public void T1()
        { 
            Borrower b = new Borrower();
            CardFactory cf = new CardFactory();
            CreditCard cc2= cf.CreateCard("ICBC"); 
            cc2.ExpireEvent += new RepaymentHandler(b.Repayment);
            cc2.ExpireMoneyEvent += new RepaymentMoneyHandler(b.Repayment);

            cc2.check1();
            cc2.check2();
        }
    }
}
